#include "ScnsKey.c.h"

#if defined(SCNS_KEY_ENABLE)&&SCNS_KEY_ENABLE==1

#include "ScnsMenu.h"
#include "ScnsBeep.h"

static void beep(ScnsKeyMsg msg)
{
#if defined(SCNS_BEEP_ENABLE)&&SCNS_BEEP_ENABLE==1
    if(msg.status==SCNS_KEY_PRESS_DOWN){scnsBeepAdd("s");}
#endif
}

const ScnsBspKeyConfig scnsBspKeyConfig[SCNS_KEY_MAX]={
    {.name="DOWN ",.callbacks=(void (*[])(ScnsKeyMsg)){scnsMenuHandleKey,NULL}},
    {.name="UP   ",.callbacks=(void (*[])(ScnsKeyMsg)){scnsMenuHandleKey,NULL}},
    {.name="LEFT ",.callbacks=(void (*[])(ScnsKeyMsg)){scnsMenuHandleKey,NULL}},
    {.name="RIGH ",.callbacks=(void (*[])(ScnsKeyMsg)){scnsMenuHandleKey,NULL}},
    {.name="TPAD ",.callbacks=(void (*[])(ScnsKeyMsg)){beep,scnsMenuHandleKey,NULL}},

    {.name="TDOWN",.callbacks=(void (*[])(ScnsKeyMsg)){beep,scnsMenuHandleKey,NULL}},
    {.name="TUP  ",.callbacks=(void (*[])(ScnsKeyMsg)){beep,scnsMenuHandleKey,NULL}},
    {.name="TLEFT",.callbacks=(void (*[])(ScnsKeyMsg)){beep,scnsMenuHandleKey,NULL}},
    {.name="TRIGH",.callbacks=(void (*[])(ScnsKeyMsg)){beep,scnsMenuHandleKey,NULL}},
    {.name="TCE  ",.callbacks=(void (*[])(ScnsKeyMsg)){beep,scnsMenuHandleKey,NULL}},

};

#endif